import requests
from config import url_cloud,headers_web

class LaboratorysProject:
    def __int__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def post_addlabProject(cls, url_cloud: str, headers=headers_web, params=None,json=None):
        '''
        Summary:新增实验室项目
        Description:云课堂实验室项目管理调用
        :param url:
        :param headers:
        :param params:
        :param json:
        :param json:
        :return:
        '''
        url = url_cloud + "/ICloudClassroomDev/v1/laboratoryproject/add"
        r = requests.post(url=url, headers=headers, params=params,json=json)
        return r

    @classmethod
    def post_dellabProject(cls, url_cloud: str, headers=headers_web, params=None,json=None):
        '''
        Summary:删除实验室项目
        Description:云课堂实验室项目管理调用
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url_cloud + "/ICloudClassroomDev/v1/laboratoryproject/delete"
        r = requests.post(url=url, headers=headers, params=params,json=json)
        return r

    @classmethod
    def post_labProjectlist(cls, url_cloud: str, headers=headers_web, params=None,json=None):
        '''
        Summary:获取实验室项目列表
        Description:云课堂实验室项目管理调用
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url_cloud + "/ICloudClassroomDev/v1/laboratoryproject"
        r = requests.post(url=url, headers=headers, params=params,json=json)
        return r

    @classmethod
    def get_labprojectcount(cls, url_cloud: str, headers=headers_web, params=None):
        '''
        Summary:获取实验室项目数量统计
        Description:调用方：1、安医大第三块大屏、
        :param url:
        :param headers:
        :param params:
        :return:
        '''
        url = url_cloud + "/ICloudClassroomDev/v1/laboratoryproject/laboratoryprojectcount"
        r = requests.post(url=url, headers=headers, params=params)
        return r